//
//  ByModelShopsListItem.m
//  chequanbao_ios
//
//  Created by pro on 2017/6/16.
//  Copyright © 2017年 com.itboye. All rights reserved.
//

#import "ByModelShopsListItem.h"

@implementation ByModelShopsListItem

- (void)setAttributes:(NSDictionary *)jsonDic {
    
    [super setAttributes:jsonDic];
    
    self.logo_urlstr = BOYE_PICTURE_VIEW_URL(self.logo);
    self.main_img_urlstr = BOYE_PICTURE_VIEW_URL(self.main_img);
    
    self.main_img_small_urlstr = BOYE_PICTURE_VIEW_URL(self.main_img_small);
    self.price = @([jsonDic[@"price"] floatValue]/100);
    
    if ([jsonDic[@"main_img"] length] != 0) {
        NSMutableArray *array = [[jsonDic[@"main_img"] componentsSeparatedByString:@","] mutableCopy];
        NSMutableArray *temp = [NSMutableArray array];
        for (NSString *str in array) {
            NSString *imgUrl = BOYE_PICTURE_VIEW_URL(str);
            [temp addObject:imgUrl];
        }
        _imgs = [temp copy];
    }
    
}

@end
